"""
演示Python正则表达式re模块的3个基础匹配方法
"""
import re
s1 = "python itheima python python"
s2 = "1python itheima python python"

# match从头匹配
res = re.match("python", s1)
print(res)
print(res.span())
print(res.group())

# search 搜索匹配
res = re.search("python", s2)
print(res)

# findall搜索全部匹配
res = re.findall("python", s2)
print(res)